package com.csglxt.service.impl;

import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;
import com.csglxt.base.DaoSupportImpl;
import com.csglxt.domain.GoodsCate;
import com.csglxt.service.GoodsCateService;

/**
 * 
 * @ClassName: GoodsCateServiceImpl
 * @Description: TODO(商品分类管理 业务层实现类)
 * @author Itchbeilef
 * @date 2015-5-28 下午9:41:41
 * 
 */
@Service
@Transactional
public class GoodsCateServiceImpl extends DaoSupportImpl<GoodsCate> implements
        GoodsCateService {
    public GoodsCate findByname(GoodsCate goods) {
        return (GoodsCate) getSession().createQuery(//
                "FROM GoodsCate G WHERE G.name=?")//
                .setParameter(0, goods.getName())//
                .uniqueResult();
    }
}
